/*
编写 : Hexh
时间 : 2012-6-26 15:52:09
*/
using System;
using System.Collections.Generic;
using HMIS.FrameWork;
using HMIS.FrameWork.DomainBase;
using HMIS.Infrastructure.Core.Repositories;
using HMIS.Infrastructure.Core.Entities;

namespace HMIS.Infrastructure.Facade.Impl
{
	/// <summary>
	///	 the impl of IInfraSmsFacade
	/// </summary>
	public class InfraSmsFacadeImpl : IInfraSmsFacade
	{

		private readonly IInfraSmsRepository InfraSmsRepository;

		public InfraSmsFacadeImpl(IInfraSmsRepository InfraSmsRepository)
		{
			this.InfraSmsRepository = InfraSmsRepository;
		}

		#region IInfraSms Entity Save,Get,Update,Delete

		public InfraSms Get(string id)
		{
			return InfraSmsRepository.Get(id);
		}

		public InfraSms Load(string id)
		{
			return InfraSmsRepository.Load(id);
		}

		public InfraSms SendSms(InfraSms entity)
		{
			return this.InfraSmsRepository.SendSms(entity);
		}

		public InfraSms SendSms(string itemId, string mobile, string content)
		{
			return this.InfraSmsRepository.SendSms(itemId, mobile, content);
		}

		public void SaveOrUpdate(InfraSms entity)
		{
			this.InfraSmsRepository.SaveOrUpdate(entity);
		}

		public void Delete(string id)
		{
			InfraSmsRepository.Delete(id);
		}
		
		public void PhysicsDelete(string id)
		{
			InfraSmsRepository.PhysicsDelete(id);
		}

		public bool IsFieldExist(string fieldName, string fieldValue, string id)
		{
			return InfraSmsRepository.IsFieldExist(fieldName, fieldValue, id);
		}
		
		public bool IsFieldExistWhere(string fieldName, string fieldValue, string id, string where)
		{
			return InfraSmsRepository.IsFieldExistWhere(fieldName, fieldValue, id, where);
		}
		
		#endregion
		
		#region Query 

		public IList<InfraSms> GetAll()
		{
			return InfraSmsRepository.GetAll();
		}

		public IList<InfraSms> GetPlist(string query, int start, int limit, string sort, string dir, List<DataFilter> filters, out long total)
		{
			return InfraSmsRepository.GetPlist(query, start, limit, sort, dir, filters, out total);
		}
		
		#endregion
	}
}
